Carbon


GetCurrentThread

Header: Threads.h Carbon status: Supported

Obtains the thread ID of the currently executing thread.

OSErr GetCurrentThread (
    ThreadID *currentThreadID
);
currentThreadID

On return, a pointer to the thread ID of the current thread.

function result

A result code.

DISCUSSION

You can use the thread ID obtained by GetCurrentThread in functions such as GetThreadState and SetThreadState to get and set the state of a thread.

AVAILABILITY

Supported in Carbon. Available in CarbonLib 1.0 and later when ThreadsLib 1.0 or later is installed. Exported by CarbonLib 1.0 and later and by ThreadsLib 1.0 and later.


© 2000 Apple Computer, Inc. — (Last Updated 3/8/2000)